SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].OriginalesAdicionalesUpdateCommand
(
	@ID numeric(10, 0),
	@NRO_ADICIONAL varchar(25),
	@ID_ORIGINAL numeric(10, 0),
	@ID_DEPARTAMENTO numeric(10, 0),
	@Original_ID numeric(10, 0),
	@Original_NRO_ADICIONAL varchar(25),
	@Original_ID_ORIGINAL numeric(10, 0),
	@Original_ID_DEPARTAMENTO numeric(10, 0)
)
AS
	SET NOCOUNT OFF;
UPDATE [ORIGINALES_ADICIONALES] SET [ID] = @ID, [NRO_ADICIONAL] = @NRO_ADICIONAL, [ID_ORIGINAL] = @ID_ORIGINAL, [ID_DEPARTAMENTO] = @ID_DEPARTAMENTO WHERE (([ID] = @Original_ID) AND ([NRO_ADICIONAL] = @Original_NRO_ADICIONAL) AND ([ID_ORIGINAL] = @Original_ID_ORIGINAL) AND ([ID_DEPARTAMENTO] = @Original_ID_DEPARTAMENTO));
	
SELECT ID, NRO_ADICIONAL, ID_ORIGINAL, ID_DEPARTAMENTO FROM ORIGINALES_ADICIONALES WHERE (ID = @ID)
GO
